// TOWN DIALOGUE SCRIPT

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

//Dervish (Commander Stieger)
begintalknode 1;
	state = -1;
	nextstate = 1;
	question = "";
	text1 = "Dervish Stieger is waiting impatiently for you to address her. She shifts her weight from foot to foot, and her left hand is resting on the pommel of her sword. _Hurry up! Don't you know we're under attack?_";
	
begintalknode 2;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 0;
	question = "I'm reporting for duty, Ma'am! (Salute.)";
	text1 = "Stieger waves away your salute. _We aren't at bootcamp now, soldier. Look, I have no idea what's happening outside, but it doesn't sound good. In fact, it sounds fucking terrible. Got it?";
	text2 = "_From what I can gather, it sounds as if the bandits have smashed their way into town. And we both know that it'd take a huge amount of power to get through our walls..._";
	text3 = "Stieger looks almost frightened for a moment, and pauses...";
	action = SET_SDF 0 8 1;
	
begintalknode 3;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 1;
	question = "Shouldn't we be out there, then?";
	text1 = "Stieger nods distractedly. _Yes..._ She focuses. _Yes. I'm going to go to the source of the explosion in a moment. Hopefully no invaders have slipped through the soldiers stationed down there yet...";
	text2 = "_But I need to give you your orders first._";
	action = SET_SDF 0 8 2;
	
begintalknode 4;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 2;
	question = "What is it I need to do, Ma'am?";
	text1 = "_I need somebody to go and make sure that there are no invaders blocking the escape stairwells. It's likely that whoever is attacking will block off the main gates, and so we'll need another way to evacuate.";
	text2 = "_This is your task. You will likely have to defend yourself and should equip whatever armour you can find in here, and take anything you can find in town. Be sure to check out the shops just to the south - they may have useful supplies._";
	action = SET_SDF 0 8 3;
	
begintalknode 5;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 3;
	question = "You think the main gates will be guarded?";
	text1 = "_Almost certainly. If you were attacking, isn't that the first place you'd secure? Even if the gates aren't barred, everybody here knows to head for the tunnels beneath the town in an emergency anyway.";
	text2 = "_Let's hope that the bastards that are attacking don't know that..._";
	text3 = "She looks outside again...";
	action = SET_SDF 0 8 4;
	
begintalknode 6;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 4;
	question = "Okay. Where are the stairwells?";
	text1 = "Stieger looks at you like you're an idiot. _There is one in each corner of town, except for this one. Remember? I suggest you go to each one in a clockwise motion, since the nearest one is just to the south. Just make sure you get to all three, got it?";	
	text2 = "_When you get to each stairwell, make sure that the townsfolk can get to it. If for any reason it is barred, try to unblock it.";
	text3 = "_And, if it comes to the worst, and you can't secure a particular exit, move on to the next one. We don't have time to fuck about here. Any questions?_";
	action = SET_SDF 0 8 5;
	
begintalknode 7;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 5;
	question = "Yes, just one - what do I do once I've secured the three passages?";
	text1 = "Stieger smiles slightly. _Heh - your optimism will serve you well. Once you've secured the three passages, I'll find you. Then, depending on the situation, we'll fight or we'll withdraw. Understood?_";
	action = SET_SDF 0 8 6;
	
begintalknode 8;
	state = 1;
	nextstate = 1;
	condition = get_flag(0,8) == 6;
	question = "Yes Ma'am! (Salute.)";
	text1 = "_Good. Remember - secure each stairwell. If you can't secure one, move on to the next one. And take whatever you need to survive. Those doors must be clear! Dismissed!_";
	text2 = "She draws her sword and runs out of the building.";
	code =	set_flag(0,9,1);
			toggle_quest(1,1);
			erase_char(6);
			end();
	break;
	
//Steven
begintalknode 9;
	state = -1;
	nextstate = 2;
	question = "";
	text1 = "Steven is waiting impatiently for you to speak to him. He shifts his weight from foot to foot, and continually looks around for oncoming Empire troops. _Hurry up! We don't have time to stand fucking about!_";
	text2 = "You grin, as impossible as it sounds considering where you are. Steven has long been your friend, and since he used to be an Empire soldier himself knows exactly what to expect in the upcoming struggle. Hence he's now in charge of your clan.";
	
begintalknode 10;
	state = 2;
	nextstate = 2;
	condition = get_flag(0,8) == 0;
	question = "Sorry... Right, what's happening now?";
	text1 = "Steven begins speaking in hurried tones. _You won't believe this... the bastards aren't bothered we've blocked off the main gates! Apparently there are escape tunnels that their people are using!";
	text2 = "_Which is bad, by the way._";
	action = SET_SDF 0 8 1;
	
begintalknode 11;
	state = 2;
	nextstate = 2;
	condition = get_flag(0,8) == 1;
	question = "Where do I fit into this problem?";
	text1 = "_Well, since they're gonna be able to evacuate whether or not we control the gates, I need somebody to go and prevent people from getting down those blasted escape tunnels...";
	text2 = "_We need to kill as many people as we can. Every person that escapes has the potential to get the Empire to send a whole platoon out here..._";
	action = SET_SDF 0 8 2;
	
begintalknode 12;
	state = 2;
	nextstate = 2;
	condition = get_flag(0,8) == 2;
	question = "That's where I come in, then?";
	text1 = "_You got it. Look, we don't have much time, but all you need to do is block the doors. Nothing fancy. No fighting, nothing. Now, the thing is, they're made of metal, so you're not gonna be able to just smash the hinges in...";
	text2 = "_But, and you'll like this, your bolt of fire spell should melt the metal enough that it warps into the stone surrounding it. That way, they'll become jammed. Got it?";
	text3 = "_Just one thing - you'll have to stand back from the doors when you do it - it's likely they'll get very hot..._";
	action = SET_SDF 0 8 3;
	
begintalknode 13;
	state = 2;
	nextstate = 2;
	condition = get_flag(0,8) == 3;
	question = "Uh-huh. And what are you going to do while I'm doing this?";
	text1 = "_Well, I've sent some people to smash the gate controls - if we cut off the tunnels, they'll eventually storm the gates. I'm gonna make sure there's nothing left for them to take back.";
	text2 = "_By the time that's done, you'll have hopefully finished. Then I'll come find you and we go after the Mayor together, right? He'll be a sitting duck with no way of escaping._";
	action = SET_SDF 0 8 4;
	
begintalknode 14;
	state = 2;
	nextstate = 2;
	condition = get_flag(0,8) == 4;
	question = "Okay. Any advice for me?";
	text1 = "_Yes - there are a few things that might be useful to know. Firstly, there are three doors that need blocking. One is to the north-west, one is in the far south-west corner and the last one is just to the north.";	
	text2 = "_Also, take whatever you can find to help you survive. All the better if you can pry it from a dead soldier's hand. Remember this is kill-or-be-killed...";
	text3 = "_And one last thing - don't be scared to kill anybody standing in your way. If you have pangs of conscience, remember that this is a war. Remember that if they could, they'd kill you. Now go!_";
	text4 = "Steven pats your back and mouths _good luck_ to you as he runs off to the north. You are on your own for now...";
	action = SET_SDF 0 8 5;
	code =	set_flag(0,9,1);
			toggle_quest(3,1);
			erase_char(28);
			end();
	break;
	
//Bakery Gal
begintalknode 15;
	state = -1;
	nextstate = -1;
	question = "";
	text1 = "This woman is shaking and weeping - she is no state to speak. All she manages to say is a very wobbly, very quiet _go away_.";

//exit magi
begintalknode 16;
	state = -1;
	nextstate = -1;
	question = "";
	text1 = "This person is waiting here to make sure nobody escapes in this direction. He nods at you, but doesn't say anything - even without the nerves, it'd be best not to speak unless it's necessary, lest you are recognised.";
	text2 = "You return the nod, and move on.";
	